import {BaseModel} from "../core/BaseModel";

module.exports = class extends BaseModel {
    constructor() {
        super();
        this._name = this.tableName('admin');
    }
    async checkLogin(userName, passWord) {
        return await this.mysql(this.tableName('admin'))
            .where({name: userName, password: passWord})
            .select('id','name','nickname','status', 'store_id', 'role_id', 'is_super')
            .first();
    }
}